package Box2D.Dynamics.Joints
{
	import Box2D.Common.Math.b2Vec2;
	import Box2D.Dynamics.b2Body;

	public class b2RevoluteJointDef extends b2JointDef
	{
		private var _localAnchorA:b2Vec2;
		private var _localAnchorB:b2Vec2;		
		public function b2RevoluteJointDef()
		{
			super(callDirect('b2RevoluteJointDef_new'));
			_localAnchorA = new b2Vec2(0,0,wrapper+17);
			_localAnchorB = new b2Vec2(0,0,wrapper+25);			
		}
		public override function get cls():Class{return b2RevoluteJoint}
		
		public function get localAnchorA():b2Vec2{return _localAnchorA}
		public function set localAnchorA(value:b2Vec2):void{_localAnchorA.Copy(value)}
		
		public function get localAnchorB():b2Vec2{return _localAnchorB}
		public function set localAnchorB(value:b2Vec2):void{_localAnchorB.Copy(value)}
		
		public function get referenceAngle():Number{return getNumber(33)}
		public function set referenceAngle(value:Number):void{setNumber(33,value)}
		
		public function get enableLimit():Boolean{return getBoolean(37)}
		public function set enableLimit(value:Boolean):void{setBoolean(37,value)}
		
		public function get lowerAngle():Number{return getNumber(38)}
		public function set lowerAngle(value:Number):void{setNumber(38,value)}
		
		public function get upperAngle():Number{return getNumber(42)}
		public function set upperAngle(value:Number):void{setNumber(42,value)}
		
		public function get enableMotor():Boolean{return getBoolean(46)}
		public function set enableMotor(value:Boolean):void{setBoolean(46,value)}
		
		public function get motorSpeed():Number{return getNumber(47)}
		public function set motorSpeed(value:Number):void{setNumber(47,value)}
		
		public function get maxMotorTorque():Number{return getNumber(51)}
		public function set maxMotorTorque(value:Number):void{setNumber(51,value)}
		
		public function Initialize(bodyA:b2Body,bodyB:b2Body,anchor:b2Vec2):void{
			call('b2RevoluteJointDef_Initialize',bodyA.wrapper,bodyB.wrapper,anchor.wrapper);
		}
		
	}
}